#include <stdio.h>
#include <iostream>

#if defined(WIN32)
#include <conio.h>
#else
#include "../common/conio.h"
#endif

#include "GLDriver/GLDriver.h"
#include "MyGLApp/MyGLApp.h"

using namespace mpgl_engine::driver;
using namespace mpgl_engine::application;
using namespace mpgl_engine::scene;
using namespace mp_myApp;

/*=================================================================
| Fcn:		Main
| Desc:		Application entry point, and what creates and runs
|			the GL Driver.
=================================================================*/
int main(void)
{

	//Press any key to run.
	printf("Mitchell's OpenGL Application Test\n");
	//system("PAUSE");
	printf("\nPress Escape anytime to exit\n");

	//We must initialize the driver (or separate console) prior
	// the the application to allow console messages during application
	// object construction calls.
	GLDriver* driver = new GLDriver(NULL, true, true);
	MyGLApp* myApp = new MyGLApp(driver->GetConsole());
	driver->SetApplication(myApp);

	//Run the driver and capture the exit results
	int results = driver->Run();
	//Destruct the driver
	delete driver;
	//Return the run exit results
	cout << "\n";
	std::system("PAUSE");
	return results;
}
